AddTileGeometryObject Document Attributes 

Declaration:

FUNCTION   AddTileGeometryObject
(   tileHandle :HANDLE;
    objectHandle :HANDLE
) :BOOLEAN ;

Description:

Adds the specified object to the specified tile resource.

Parameters:

tileHandle The handle to the tile resource.
objectHandle The handle to the object to add.

Result:

TRUE if a valid object was successfully added; FALSE otherwise.

Example:

return := AddTileGeometryGroup(tileHandle, objectHandle);

See Also:

CreateTile   ShowEditTileDialog   ShowEditTileSettingsDialog   ShowNewTileDialog   GetTileGeometryGroup   BeginGroupN   AddTileGeometryObject   GetTileGroupParent   IsTileGroupContainedObject   GetTileBackgroundColor   SetTileBackgroundColor   GetTileRepetitionPoint   SetTileRepetitionPoint   GetTileOffsetPoint   SetTileOffsetPoint  



  CreateImageFromPaint Document Attributes 

Declaration:

FUNCTION   CreateImageFromPaint
(   paint :HANDLE;
    imageName :STRING
) :HANDLE ;

Description:

Creates an image resource from a paint node.

Parameters:

paint Handle to the paint node to be used to create the image resource.
imageName User-specified name to be used to identify the newly created image resource.

Result:

Returns the handle to the newly create image resource if successful; nil otherwise.

Example:

imageHandle := CreateImageFromPaint(paintHandle, 'My Image');



  CreateTile Document Attributes 

Declaration:

FUNCTION   CreateTile
( tileName:STRING ) :HANDLE ;

Description:

Creates a new tile resource.

Parameters:

tileName A user-specified name by which the newly created tile will be identified.

Result:

Returns a handle to a new tile resource if successful, otherwise the function returns nil.

Example:

tileHandle := CreateTile('My Tile');

See Also:

CreateTile   ShowEditTileDialog   ShowEditTileSettingsDialog   ShowNewTileDialog   GetTileGeometryGroup   BeginGroupN   AddTileGeometryObject   GetTileGroupParent   IsTileGroupContainedObject   GetTileBackgroundColor   SetTileBackgroundColor   GetTileRepetitionPoint   SetTileRepetitionPoint   GetTileOffsetPoint   SetTileOffsetPoint  



  FFillBack Document Attributes 

Declaration:

PROCEDURE   FFillBack
( VAR  red :LONGINT;
  VAR  green :LONGINT;
  VAR  blue :LONGINT
) ;

Description:

Procedure FFillBack returns the current fill background color. RGB values are in the range of 0~65535.

Parameters:

red Returns RGB color component value.
green Returns RGB color component value.
blue Returns RGB color component value.

Example:

FFillBack(redValue,greenValue,blueValue);

See Also:

RGBToColorIndex   ColorIndexToRGB  



  FFillColorByClass Document Attributes 

Declaration:

FUNCTION   FFillColorByClass
:BOOLEAN ;

Description:

Function FFillColorByClass returns whether the global attributes are set to use the fill colors of the default class.

Example:

useClassFillCol:=FFillColorByClass;



  FFillFore Document Attributes 

Declaration:

PROCEDURE   FFillFore
( VAR  red :LONGINT;
  VAR  green :LONGINT;
  VAR  blue :LONGINT
) ;

Description:

Procedure FFillFore returns the current fill foreground color. RGB values are in the range of 0~65535.

Parameters:

red Returns RGB color component value.
green Returns RGB color component value.
blue Returns RGB color component value.

Example:

FFillFore(redValue,greenValue,blueValue);

See Also:

RGBToColorIndex   ColorIndexToRGB  



  FFillPat Document Attributes 

Declaration:

FUNCTION   FFillPat
:LONGINT ;

Description:

Function FFillPat returns the current fill pattern setting.

Fill patterns and their associated constants can be found in the VectorScript Appendix.

Example:

currFillStyle:=FFillPat;



  FFPatByClass Document Attributes 

Declaration:

FUNCTION   FFPatByClass
:BOOLEAN ;

Description:

Function FFPatByClass returns whether the global attributes are set to use the fill pattern of the default class.

Example:

useClassFPat:=FFPatByClass;



  FillBack Document Attributes 

Declaration:

PROCEDURE   FillBack
(   colorR :LONGINT;
    colorG :LONGINT;
    colorB :LONGINT
) ;

Description:

Procedure FillBack sets the active fill background color setting for the document. RGB values are in the range of 0~65535.

Parameters:

color RGB color value to set as active fill background color.

Example:

FillBack(65535,0,39321);

See Also:

RGBToColorIndex   ColorIndexToRGB  



  FillFore Document Attributes 

Declaration:

PROCEDURE   FillFore
(   colorR :LONGINT;
    colorG :LONGINT;
    colorB :LONGINT
) ;

Description:

Procedure FillFore sets the active fill foreground color setting for the document. RGB values are in the range of 0~65535.

Parameters:

color RGB color value to set as active fill foreground color.

Example:

FillFore(65535,0,39321);

See Also:

RGBToColorIndex   ColorIndexToRGB  



  FillPat Document Attributes 

Declaration:

PROCEDURE   FillPat
( patNumber:LONGINT ) ;

Description:

Procedure FillPat sets the active fill pattern for the document. Any objects created after a calling this procedure will use the specified fill pattern.

Fill patterns and their associated constants can be found in the VectorScript Appendix.

Parameters:

patNumber Index of fill pattern to be set as document default.

Example:

Rect(0,0,2,2);
FillPat(21);
Rect(2,2,4,4);



  FLSByClass Document Attributes 

Declaration:

FUNCTION   FLSByClass
:BOOLEAN ;

Description:

Function FLSByClass returns whether the global attributes are set to use the line style of the default class.

Example:

useClassLStyle:=FLSByClass;



  FLWByClass Document Attributes 

Declaration:

FUNCTION   FLWByClass
:BOOLEAN ;

Description:

Function FLWByClass returns whether the global attributes are set to use the line weight of the default class.

Example:

useClassLWidth:=FLWByClass;



  FMarker Document Attributes 

Declaration:

PROCEDURE   FMarker
( VAR  style :INTEGER;
  VAR  size :REAL;
  VAR  ang :INTEGER
) ;

Special Notes:

FMarker is obsolete as of VectorWorks 2008

Description:

Procedure FMarker returns the active marker style parameters.

A complete listing of marker styles can be found in the Appendix

Parameters:

style Returns marker style.
size Returns marker size in inches measured in page space.
ang Returns marker angle (in degrees).

Example:

PROCEDURE Example;
VAR
	style :INTEGER;
	size  :REAL;
	ang   :INTEGER;
BEGIN
	FMarker(style, size, ang);
	Message(style, ' ', size, ' ', ang);
END;
RUN(Example);




  FMarkerByClass Document Attributes 

Declaration:

FUNCTION   FMarkerByClass
:BOOLEAN ;

Description:

Function FMarkerByClass returns whether the global attributes are set to use the arrow style of the default class.

Example:

useClassMarker:=FMarkerByClass;



  FPenBack Document Attributes 

Declaration:

PROCEDURE   FPenBack
( VAR  red :LONGINT;
  VAR  green :LONGINT;
  VAR  blue :LONGINT
) ;

Description:

Procedure FPenBack returns the current pen background color. RGB values are in the range of 0~65535.

Parameters:

red Returns RGB color component value.
green Returns RGB color component value.
blue Returns RGB color component value.

See Also:

RGBToColorIndex   ColorIndexToRGB  



  FPenColorByClass Document Attributes 

Declaration:

FUNCTION   FPenColorByClass
:BOOLEAN ;

Description:

Function FPenColorByClass returns whether the global attributes are set to use the pen colors of the default class.

Example:

useClassPenColor:=FPenColorByClass;



  FPenFore Document Attributes 

Declaration:

PROCEDURE   FPenFore
( VAR  red :LONGINT;
  VAR  green :LONGINT;
  VAR  blue :LONGINT
) ;

Description:

Procedure FPenFore returns the current pen foreground color of the document. RGB values are in the range of 0~65535.

Parameters:

red Returns RGB color component value.
green Returns RGB color component value.
blue Returns RGB color component value.

See Also:

RGBToColorIndex   ColorIndexToRGB  



  FPenPat Document Attributes 

Declaration:

FUNCTION   FPenPat
:INTEGER ;

Special Notes:

FPenPat is obsolete as of Vectorworks 2013

Description:

Function FPenPat returns the active pen pattern setting.

Example:

CurrPenStyle:=FPenPat;



  FPenPatN Document Attributes 

Declaration:

FUNCTION   FPenPatN
:LONGINT ;

Description:

Function FPenPatN returns the active pen pattern setting.

See Also:

PenPatN  



  FPenSize Document Attributes 

Declaration:

FUNCTION   FPenSize
:INTEGER ;

Description:

Function FPenSize returns the active pen size setting (in mils).

Example:

CurrPenSize:=FPenSize;



  GetDashStyle Document Attributes 

Declaration:

FUNCTION   GetDashStyle
(   swt :BOOLEAN;
    numPairs :INTEGER;
    pair1DX :REAL;
    pair1DY :REAL;
    pair2DX :REAL;
    pair2DY :REAL;
    pair3DX :REAL;
    pair3DY :REAL;
    pair4DX :REAL;
    pair4DY :REAL;
    pair5DX :REAL;
    pair5DY :REAL
) :INTEGER ;

Description:

Function GetDashStyle searches for the pattern specified by the parameters. If it exists, then the linestyle index associated with the existing dash pattern is returned. If it does not exist, then it is added to the document and the linestyle index associated with the new dash pattern is returned.

Example:

currLS:=GetDashStyle;



  GetDashStyleIndex Document Attributes 

Declaration:

FUNCTION   GetDashStyleIndex
(   swt :BOOLEAN;
    numPairs :INTEGER;
    pair1DX :REAL;
    pair1DY :REAL;
    pair2DX :REAL;
    pair2DY :REAL;
    pair3DX :REAL;
    pair3DY :REAL;
    pair4DX :REAL;
    pair4DY :REAL;
    pair5DX :REAL;
    pair5DY :REAL
) :INTEGER ;

Description:

Function GetDashStyleIndex searches for the pattern specified by the parameters. If it exists, then the linestyle index associated with the existing dash pattern is returned. If it does not exist, then it is added to the document and the linestyle index associated with the new dash pattern is returned.



  GetDefaultBeginningMarker Document Attributes 

Declaration:

FUNCTION   GetDefaultBeginningMarker
( VAR  style :LONGINT;
  VAR  angle :INTEGER;
  VAR  size :REAL;
  VAR  width :REAL;
  VAR  thicknessBasis :INTEGER;
  VAR  thickness :REAL;
  VAR  visibility :BOOLEAN
) :BOOLEAN ;

Description:

Gets all properties for the document default beginning marker. Return TRUE if operation was successful.

Parameters:

style The marker style. (see comments for details)
angle The marker angle in degrees. (0 to 90)
size The marker size in page inches.
width The marker width in page inches.
thicknessBasis The marker thickness basis. ( see comments for details)
thickness The marker thickness.
visibility The marker visibility.

Example:

PROCEDURE Example;
VAR
	ok : BOOLEAN;
style: INTEGER;
	angle: INTEGER;
	size: REAL;
	width: REAL;
	thickBasis: INTEGER;
	thickness: REAL;
	visibility: BOOLEAN;

	
BEGIN
ok := GetDefaultBeginningMarker (style, angle, size, width, thickBasis, thickness, visibility);
Message (style, ' /  ', angle, '  /  ', size, '  /  ', width, ' /  ', thickBasis, ' /  ', thickness, ' /  ', visibility);	
END;

RUN(Example);

See Also:

GetDefaultEndMarker  



  GetDefaultEndMarker Document Attributes 

Declaration:

FUNCTION   GetDefaultEndMarker
( VAR  style :LONGINT;
  VAR  angle :INTEGER;
  VAR  size :REAL;
  VAR  width :REAL;
  VAR  thicknessBasis :INTEGER;
  VAR  thickness :REAL;
  VAR  visibility :BOOLEAN
) :BOOLEAN ;

Description:

Gets all properties for the document default end marker. Return TRUE if operation was successful.

Parameters:

style The marker style. (see comments for details)
angle The marker angle in degrees. (0 to 90)
size The marker size in page inches.
width The marker width in page inches.
thicknessBasis The marker thickness basis. ( see comments for details)
thickness The marker thickness.
visibility The marker visibility.

Example:

PROCEDURE Example;
VAR
	ok : BOOLEAN;
style: INTEGER;
	angle: INTEGER;
	size: REAL;
	width: REAL;
	thickBasis: INTEGER;
	thickness: REAL;
	visibility: BOOLEAN;

	
BEGIN
ok := GetDefaultEndMarker (style, angle, size, width, thickBasis, thickness, visibility);
Message (style, ' /  ', angle, '  /  ', size, '  /  ', width, ' /  ', thickBasis, ' /  ', thickness, ' /  ', visibility);	
END;

RUN(Example);

See Also:

GetDefaultBeginningMarker  



  GetDefaultOpacity Document Attributes 

Declaration:

PROCEDURE   GetDefaultOpacity
VAR opacity:INTEGER ) ;

Description:

Returns the default opacity.



  GetDocumentDefaultSketchStyle Document Attributes 

Declaration:

FUNCTION   GetDocumentDefaultSketchStyle
:STRING ;

Description:

Returns the document default sketch style. Returns the string 'No Sketch' if the current sketch style is 'No Sketch'.



  GetGradientData Document Attributes 

Declaration:

PROCEDURE   GetGradientData
(   gradient :HANDLE;
    segmentIndex :INTEGER;
  VAR  spotPosition :REAL;
  VAR  midpointPosition :REAL;
  VAR  red :LONGINT;
  VAR  green :LONGINT;
  VAR  blue :LONGINT
) ;

Description:

Gets the spot position, midpoint position and color of the specified gradient segment.

Parameters:

gradient Gradient that contains the segment.
segmentIndex Segment from which to get the data.
(segment indexes begin with 1)
spotPosition Position of the segment's color spot relative to left-most point of the gradient.
(position >= 0.0 and position <= 1.0)
midpointPosition Position of the segment's midpoint relative to color spot immediately to left.
(position >= 0.0 and position <= 1.0)
red Red component of the color spot's color.
(red >= 0 and red <= 255)
green Green component of the color spot's color.
(green >= 0 and green <= 255)
blue Blue component of the color spot's color.
(blue >= 0 and blue <= 255)

Example:

PROCEDURE Example;
VAR
   gradient :HANDLE;
   segmentIndex :INTEGER;
   spotPosition, midpointPosition :REAL;
   red, green, blue :LONGINT;
BEGIN
   gradient := GetObject('Cyan-Magenta-Yellow');
   segmentIndex := 3;
   GetGradientData(gradient, segmentIndex, spotPosition, midpointPosition, red, green, blue);
   Message(red, ' ', green, ' ', blue);
END;
RUN(Example);



  GetGradientMidpointPosition Document Attributes 

Declaration:

PROCEDURE   GetGradientMidpointPosition
(   gradient :HANDLE;
    segmentIndex :INTEGER;
  VAR  position :REAL
) ;

Description:

Gets the midpoint position of the specified gradient segment.

Parameters:

gradient Gradient that contains the segment.
segmentIndex Segment from which to get the data.
(segment indexes begin with 1)
position Position of the segment's midpoint relatvie to color spot immediately to left.
(position >= 0.0 and position <= 1.0)

Example:

GetGradientMidpointPosition(gradientHandle, 4, midpointPosition);



  GetGradientSpotColor Document Attributes 

Declaration:

PROCEDURE   GetGradientSpotColor
(   gradient :HANDLE;
    segmentIndex :INTEGER;
  VAR  red :LONGINT;
  VAR  green :LONGINT;
  VAR  blue :LONGINT
) ;

Description:

Gets the spot color of the specified gradient segment.

Parameters:

gradient Gradient that contains the segment.
segmentIndex Segment from which to get the data.
(segment indexes begin with 1)
red Red component of the color spot's color.
(red >= 0 and red <= 255)
green Green component of the color spot's color.
(green >= 0 and green <= 255)
blue Blue component of the color spot's color.
(blue >= 0 and blue <= 255)

Example:

GetGradientSpotColor(gradientHandle, 4, red, green, blue);



  GetGradientSpotPosition Document Attributes 

Declaration:

PROCEDURE   GetGradientSpotPosition
(   gradient :HANDLE;
    segmentIndex :INTEGER;
  VAR  position :REAL
) ;

Description:

Gets the spot position of the specified gradient segment.

Parameters:

gradient Gradient that contains the segment.
segmentIndex Segment from which to get the data.
(segment indexes begin with 1)
position Position of the segment's color spot relative to left-most point of the gradient.
(position >= 0.0 and position <= 1.0)

Example:

GetGradientSpotPosition(gradientHandle, 4, spotPosition);



  GetNumGradientSegments Document Attributes 

Declaration:

FUNCTION   GetNumGradientSegments
( gradient:HANDLE ) :INTEGER ;

Description:

Gets the number of segments in the gradient.

Parameters:

gradient The gradient from which to get the number of segments.

Result:

Returns the number of segments in the gradient if successful; 0 otherwise.

Example:

numSegments := GetNumGradientSegments(gradientHandle);



  GetTileBackgroundColor Document Attributes 

Declaration:

PROCEDURE   GetTileBackgroundColor
(   tileHandle :HANDLE;
  VAR  red :LONGINT;
  VAR  green :LONGINT;
  VAR  blue :LONGINT
) ;

Description:

Gets the specified tile resource's background color.

Parameters:

tileHandle The tile resource from which to get the background color.
red Returns RGB color component value.
green Returns RGB color component value.
blue Returns RGB color component value.

Example:

GetTileBackgroundColor(tileHandle, backgroundColor);

See Also:

CreateTile   ShowEditTileDialog   ShowEditTileSettingsDialog   ShowNewTileDialog   GetTileGeometryGroup   BeginGroupN   AddTileGeometryObject   GetTileGroupParent   IsTileGroupContainedObject   GetTileBackgroundColor   SetTileBackgroundColor   GetTileRepetitionPoint   SetTileRepetitionPoint   GetTileOffsetPoint   SetTileOffsetPoint  



  GetTileGeometryGroup Document Attributes 

Declaration:

FUNCTION   GetTileGeometryGroup
( tileHandle:HANDLE ) :HANDLE ;

Description:

Gets the tile resource's geometry group.

Parameters:

tileHandle The handle to the tile from which to get the group.

Result:

A handle to the tile geometry group, if successful; nil otherwise.

Example:

tileGroupHandle := GetTileGeometryGroup(tileHandle);

See Also:

CreateTile   ShowEditTileDialog   ShowEditTileSettingsDialog   ShowNewTileDialog   GetTileGeometryGroup   BeginGroupN   AddTileGeometryObject   GetTileGroupParent   IsTileGroupContainedObject   GetTileBackgroundColor   SetTileBackgroundColor   GetTileRepetitionPoint   SetTileRepetitionPoint   GetTileOffsetPoint   SetTileOffsetPoint  



  GetTileGroupParent Document Attributes 

Declaration:

FUNCTION   GetTileGroupParent
( groupHandle:HANDLE ) :HANDLE ;

Description:

Gets the tile resource parent of the specified tile group.

Parameters:

groupHandle The group handle of which to get the tile resource parent.

Result:

The tile parent handle; nil otherwise.

Example:

tileHandle := GetTileGroupParent(groupHandle);

See Also:

CreateTile   ShowEditTileDialog   ShowEditTileSettingsDialog   ShowNewTileDialog   GetTileGeometryGroup   BeginGroupN   AddTileGeometryObject   GetTileGroupParent   IsTileGroupContainedObject   GetTileBackgroundColor   SetTileBackgroundColor   GetTileRepetitionPoint   SetTileRepetitionPoint   GetTileOffsetPoint   SetTileOffsetPoint  



  GetTileOffsetPoint Document Attributes 

Declaration:

PROCEDURE   GetTileOffsetPoint
(   tileHandle :HANDLE;
  VAR  offsetPoint :POINT
) ;

Description:

Gets the specified tile resource's offset point.

Parameters:

tileHandle The tile resource from which to get the offset point.
offsetPoint The retrieved offset point.

Example:

GetTileOffsetPoint(tileHandle, offsetPoint);

See Also:

CreateTile   ShowEditTileDialog   ShowEditTileSettingsDialog   ShowNewTileDialog   GetTileGeometryGroup   BeginGroupN   AddTileGeometryObject   GetTileGroupParent   IsTileGroupContainedObject   GetTileBackgroundColor   SetTileBackgroundColor   GetTileRepetitionPoint   SetTileRepetitionPoint   GetTileOffsetPoint   SetTileOffsetPoint  



  GetTileRepetitionPoint Document Attributes 

Declaration:

PROCEDURE   GetTileRepetitionPoint
(   tileHandle :HANDLE;
  VAR  repetitionPoint :POINT
) ;

Description:

Gets the specified tile resource's repetition point.

Parameters:

tileHandle The tile resource from which to get the repetition point.
repetitionPoint The retrieved repetition point.

Example:

GetTileRepetitionPoint(tileHandle, repetitionPoint);

See Also:

CreateTile   ShowEditTileDialog   ShowEditTileSettingsDialog   ShowNewTileDialog   GetTileGeometryGroup   BeginGroupN   AddTileGeometryObject   GetTileGroupParent   IsTileGroupContainedObject   GetTileBackgroundColor   SetTileBackgroundColor   GetTileRepetitionPoint   SetTileRepetitionPoint   GetTileOffsetPoint   SetTileOffsetPoint  



  InsertGradientSegment Document Attributes 

Declaration:

FUNCTION   InsertGradientSegment
(   gradient :HANDLE;
    spotPosition :REAL;
    midpointPosition :REAL;
    red :LONGINT;
    green :LONGINT;
    blue :LONGINT
) :INTEGER ;

Description:

Inserts a new segment into the gradient and initializes its data to the specified values.

A segment consists of a single color spot and the single midpoint immediately to the right of the color spot.

Parameters:

gradient Gradient into which a segment is to be inserted.
spotPosition Position of the segment's color spot relative to left-most point of the gradient.
(position >= 0.0 and position <= 1.0)
midpointPosition Position of the segment's midpoint relative to color spot immediately to left.
(position >= 0.0 and position <= 1.0)
red Red component of the color spot's color.
(red >= 0 and red <= 255)
green Green component of the color spot's color.
(green >= 0 and green <= 255)
blue Blue component of the color spot's color.
(blue >= 0 and blue <= 255)

Result:

Returns the index of the newly created segment; 0 otherwise.

Note: segment indexes begin with 1.

Example:

index := InsertGradientSegment(gradientHandle, 0.35, 0.4, 255, 255, 255);
{ inserts a white color spot at position, 0.35, with a midpoint position of 0.4 }



  IsTileGroupContainedObject Document Attributes 

Declaration:

FUNCTION   IsTileGroupContainedObject
( objectHandle:HANDLE ) :BOOLEAN ;

Description:

Determines if the specified object is a tile group-contained object.

Parameters:

objectHandle The object handle to check.

Result:

TRUE if the object is a tile group-contained object; FALSE otherwise.

Example:

return := IsTileGroupContainedObject(objectHandle);

See Also:

CreateTile   ShowEditTileDialog   ShowEditTileSettingsDialog   ShowNewTileDialog   GetTileGeometryGroup   BeginGroupN   AddTileGeometryObject   GetTileGroupParent   IsTileGroupContainedObject   GetTileBackgroundColor   SetTileBackgroundColor   GetTileRepetitionPoint   SetTileRepetitionPoint   GetTileOffsetPoint   SetTileOffsetPoint  



  IsUserColor Document Attributes 

Declaration:

FUNCTION   IsUserColor
(   ColorIDX :INTEGER;
  VAR  ColorName :DYNARRAY[] of CHAR
) :BOOLEAN ;

Description:

Returns True if the color is a user color.



  Marker Document Attributes 

Declaration:

PROCEDURE   Marker
(   style :INTEGER;
    size :REAL;
    ang :INTEGER
) ;

Special Notes:

Marker is obsolete as of VectorWorks 2008

Description:

Marker defines a marker (arrowhead) style for the document. This marker style becomes the active style for the document.

A complete listing of marker styles can be found in the Appendix

Parameters:

style Marker style constant.
size Marker size in inches measured in page space. Legal values are 0.0 to 2.0.
ang Marker angle.

Example:

Marker(2,0.25,60);



  NumColors Document Attributes 

Declaration:

FUNCTION   NumColors
:INTEGER ;

Description:

Returns the last used color index in the current document.



  NumDashStyles Document Attributes 

Declaration:

FUNCTION   NumDashStyles
:INTEGER ;

Description:

Function NumDashStyles returns the number of available line dash patterns.

Example:

numLS:=NumDashStyles;



  Opacity Document Attributes 

Declaration:

PROCEDURE   Opacity
( opacity:INTEGER ) ;

Description:

Sets the active opacity.



  PenBack Document Attributes 

Declaration:

PROCEDURE   PenBack
(   colorR :LONGINT;
    colorG :LONGINT;
    colorB :LONGINT
) ;

Description:

Procedure PenBack set the active pen background color for the document. RGB values are in the range of 0~65535.

Parameters:

color RGB color value to be set as active pen background.

Example:

PenBack(65535,0,39321);

See Also:

RGBToColorIndex   ColorIndexToRGB  



  PenFore Document Attributes 

Declaration:

PROCEDURE   PenFore
(   colorR :LONGINT;
    colorG :LONGINT;
    colorB :LONGINT
) ;

Description:

Procedure PenFore sets the active pen foreground color for the document. RGB values are in the range of 0~65535.

Parameters:

color RGB color value to be set as active pen foreground.

Example:

PenFore(65535,0,39321);

See Also:

RGBToColorIndex   ColorIndexToRGB  



  PenPat Document Attributes 

Declaration:

PROCEDURE   PenPat
( patNumber:INTEGER ) ;

Special Notes:

PenPat is obsolete as of Vectorworks 2013

Description:

Procedure PenPat sets the active pen pattern (line style) for the document.

If patNumber is in the range 0 to 71 the linestyle will be set to the corresponding fill pattern. A value in the range -1 to -8, will set the linestyle to one of the defined Vectorworks linestyles.

Fill patterns and their associated constants can be found in the VectorScript Appendix.


Parameters:

patNumber Pattern/linestyle ID value.

Example:

PenPat(25);
{ uses fill pattern 25 as the active pen pattern }

PenPat(-3);
{ sets a linestyle as the active pen pattern }



  PenPatN Document Attributes 

Declaration:

PROCEDURE   PenPatN
( patNumber:LONGINT ) ;

Description:

Procedure PenPatN sets the active pen pattern (line style) for the document.

If patNumber is in the range 0 to 71 the linestyle will be set to the corresponding fill pattern. A negative value, will set the linestyle to the line type resource whose index is the negative of the value.

Parameters:

patNumber Pattern/linestyle ID value.

Example:

PenPat(25);
{ uses fill pattern 25 as the active pen pattern }

PenPat(-10);
{ sets the line type with the index of 10 as the active pen pattern }

See Also:

FPenPatN  



  PenSize Document Attributes 

Declaration:

PROCEDURE   PenSize
( lw:INTEGER ) ;

Description:

Procedure PenSize sets the active line weight for the document.

Parameters:

lw Line weight (in mils). Fourteen (14) mils equals one pixel.

Example:

PenSize(28);



  RemoveGradientSegment Document Attributes 

Declaration:

PROCEDURE   RemoveGradientSegment
(   gradient :HANDLE;
    segmentIndex :INTEGER
) ;

Description:

Removes the specified segment from the specified gradient.

Parameters:

gradient Gradient from which to remove a segment.
segmentIndex Index of segment to be removed.
(segment indexes begin with 1)

Example:

RemoveGradientSegment (gradientHandle, 4);
{ removes the segment with index 4 }



  SetDashStyle Document Attributes 

Declaration:

PROCEDURE   SetDashStyle
(   swt :BOOLEAN;
    numPairs :INTEGER;
    pair1DX :REAL;
    pair1DY :REAL;
    pair2DX :REAL;
    pair2DY :REAL;
    pair3DX :REAL;
    pair3DY :REAL;
    pair4DX :REAL;
    pair4DY :REAL;
    pair5DX :REAL;
    pair5DY :REAL
) ;

Description:

Procedure SetDashStyle creates a new linestyle in a Vectorworks document. Parameter swt defines whether the linestyle will be scaled with thickness, and parameter numPairs specifies the number of length pairs defining the linestyle.

The linestyle is defined by up to five black/white length pairs, which are specified in parameters b1,w1 through b5,w5. The minimum length of any given black or white parameter is 1 point, or 1/72 of an inch, and the line specification must be in pairs.

Example:

SetDashStyle(True,0,1",1/4",1/4",1/4");



  SetDashStyleN Document Attributes 

Declaration:

PROCEDURE   SetDashStyleN
(   name :STRING;
    swt :BOOLEAN;
    numPairs :INTEGER;
    pair1DX :REAL;
    pair1DY :REAL;
    pair2DX :REAL;
    pair2DY :REAL;
    pair3DX :REAL;
    pair3DY :REAL;
    pair4DX :REAL;
    pair4DY :REAL;
    pair5DX :REAL;
    pair5DY :REAL
) ;

Description:

Procedure SetDashStyleN creates a new linestyle in a Vectorworks document. Parameter name defines the name of the linestyle, parameter swt defines whether the linestyle will be scaled with thickness, and parameter numPairs specifies the number of length pairs defining the linestyle.

The linestyle is defined by up to five black/white length pairs, which are specified in parameters b1,w1 through b5,w5. The minimum length of any given black or white parameter is 1 point, or 1/72 of an inch, and the line specification must be in pairs.

Example:

SetDashStyle('My Dash Style', True,0,1",1/4",1/4",1/4");



  SetDefaultBeginningMarker Document Attributes 

Declaration:

FUNCTION   SetDefaultBeginningMarker
(   style :LONGINT;
    angle :INTEGER;
    size :REAL;
    width :REAL;
    thicknessBasis :INTEGER;
    thickness :REAL;
    visibility :BOOLEAN
) :BOOLEAN ;

Description:

Sets all properties of the document default beginning marker. Return TRUE if operation was successful.

Parameters:

style The marker style. (see comments for details)
angle The marker angle in degrees. (0 to 90)
size The marker size in page inches.
width The marker width in page inches.
thicknessBasis The marker thickness basis. ( see comments for details)
thickness The marker thickness.
visibility The marker visibility.

Example:

PROCEDURE Example;
VAR
	ok : BOOLEAN;
BEGIN
	ok := SetDefaultBeginningMarker(2176, 15, 0.5, 0, 0, 2, TRUE);
END;

RUN(Example);

See Also:

SetDefaultEndMarker  



  SetDefaultEndMarker Document Attributes 

Declaration:

FUNCTION   SetDefaultEndMarker
(   style :LONGINT;
    angle :INTEGER;
    size :REAL;
    width :REAL;
    thicknessBasis :INTEGER;
    thickness :REAL;
    visibility :BOOLEAN
) :BOOLEAN ;

Description:

Sets all properties of the document default end marker. Return TRUE if operation was successful.

Parameters:

style The marker style. (see comments for details)
angle The marker angle in degrees. (0 to 90)
size The marker size in page inches.
width The marker width in page inches.
thicknessBasis The marker thickness basis. ( see comments for details)
thickness The marker thickness.
visibility The marker visibility.

Example:

PROCEDURE Example;
VAR
	ok : BOOLEAN;
BEGIN
	ok := SetDefaultEndMarker(2176, 15, 0.5, 0, 0, 2, TRUE);	
END;

RUN(Example);

See Also:

SetDefaultBeginningMarker  



  SetDefaultOpacity Document Attributes 

Declaration:

PROCEDURE   SetDefaultOpacity
( opacity:INTEGER ) ;

Description:

Sets the default opacity to document.

Parameters:

opacity The opacity as percent value in range [0-100].



  SetDefaultOpacityByClass Document Attributes 

Declaration:

PROCEDURE   SetDefaultOpacityByClass
;

Description:

Sets the default opacity to use the current class opacity.



  SetDocumentDefaultSketchStyle Document Attributes 

Declaration:

FUNCTION   SetDocumentDefaultSketchStyle
( sketchName:STRING ) :BOOLEAN ;

Description:

Sets the document default sketch style. Set sketchName to 'No Sketch' to set the document default sketch to 'No Sketch'.

Parameters:

sketchName Sketch Style name.



  SetGradientData Document Attributes 

Declaration:

PROCEDURE   SetGradientData
(   gradient :HANDLE;
  VAR  segmentIndex :INTEGER;
    spotPosition :REAL;
    midpointPosition :REAL;
    red :LONGINT;
    green :LONGINT;
    blue :LONGINT
) ;

Description:

Sets the spot position, midpoint position and color of the specified gradient segment.

Note: you must use a variable, initialized to the segment index, to pass as a parameter. After the data has been set, this variable will contain the index of the segment, which may have changed because of the spot position specified.

Parameters:

gradient Gradient that contains the segment.
segmentIndex Segment for which to set the data.
(segment indexes begin with 1)
spotPosition Position of the segment's color spot relative to left-most point of the gradient.
(position >= 0.0 and position <= 1.0)
midpointPosition Position of the segment's midpoint relative to color spot immediately to left.
(position >= 0.0 and position <= 1.0)
red Red component of the color spot's color.
(red >= 0 and red <= 255)
green Green component of the color spot's color.
(green >= 0 and green <= 255)
blue Blue component of the color spot's color.
(blue >= 0 and blue <= 255)

Example:

segmentIndex := 4;
SetGradientData(gradientHandle, segmentIndex, 0.9, 0.5, 255, 255, 255);



  SetGradientMidpointPosition Document Attributes 

Declaration:

PROCEDURE   SetGradientMidpointPosition
(   gradient :HANDLE;
    segmentIndex :INTEGER;
    position :REAL
) ;

Description:

Sets the midpoint position of the specified gradient segment.

Parameters:

gradient Gradient that contains the segment.
segmentIndex Segment for which to set the data.
(segment indexes begin with 1)
position Position of the segment's midpoint relatvie to color spot immediately to left.
(position >= 0.0 and position <= 1.0)

Example:

SetGradientMidpointPosition(gradientHandle, 4, 0.6);



  SetGradientSpotColor Document Attributes 

Declaration:

PROCEDURE   SetGradientSpotColor
(   gradient :HANDLE;
    segmentIndex :INTEGER;
    red :LONGINT;
    green :LONGINT;
    blue :LONGINT
) ;

Description:

Sets the spot color of the specified gradient segment.

Parameters:

gradient Gradient that contains the segment.
segmentIndex Segment for which to set the data.
(segment indexes begin with 1)
red Red component of the color spot's color.
(red >= 0 and red <= 255)
green Green component of the color spot's color.
(green >= 0 and green <= 255)
blue Blue component of the color spot's color.
(blue >= 0 and blue <= 255)

Example:

SetGradientSpotColor(gradientHandle, 4, 255, 255, 255);



  SetGradientSpotPosition Document Attributes 

Declaration:

PROCEDURE   SetGradientSpotPosition
(   gradient :HANDLE;
  VAR  segmentIndex :INTEGER;
    position :REAL
) ;

Description:

Sets the spot position of the specified gradient segment.

Note: you must use a variable, initialized to the segment index, to pass as a parameter. After the data has been set, this variable will contain the index of the segment, which may have changed because of the spot position specified.

Parameters:

gradient Gradient that contains the segment.
segmentIndex Segment for which to set the data.
(segment indexes begin with 1)
position Position of the segment's color spot relative to left-most point of the gradient.
(position >= 0.0 and position <= 1.0)

Example:

SetGradientSpotPosition(gradientHandle, segmentIndex, 0.9);



  SetTileBackgroundColor Document Attributes 

Declaration:

PROCEDURE   SetTileBackgroundColor
(   tileHandle :HANDLE;
    backgroundColorR :LONGINT;
    backgroundColorG :LONGINT;
    backgroundColorB :LONGINT
) ;

Description:

Gets the specified tile resource's background color.

Parameters:

tileHandle The tile resource in which to set the background color.
backgroundColor The RGB background color to set.

Example:

SetTileBackgroundColor(tileHandle, backgroundColor);

See Also:

CreateTile   ShowEditTileDialog   ShowEditTileSettingsDialog   ShowNewTileDialog   GetTileGeometryGroup   BeginGroupN   AddTileGeometryObject   GetTileGroupParent   IsTileGroupContainedObject   GetTileBackgroundColor   SetTileBackgroundColor   GetTileRepetitionPoint   SetTileRepetitionPoint   GetTileOffsetPoint   SetTileOffsetPoint  



  SetTileOffsetPoint Document Attributes 

Declaration:

PROCEDURE   SetTileOffsetPoint
(   tileHandle :HANDLE;
    offsetPoint :POINT
) ;

Description:

Sets the specified tile resource's offset point.

Parameters:

tileHandle The tile resource in which to set the offset point.
offsetPoint The offsets point to be set.

Example:

SetTileRepetitionPoint(tileHandle, offsetPoint);

See Also:

CreateTile   ShowEditTileDialog   ShowEditTileSettingsDialog   ShowNewTileDialog   GetTileGeometryGroup   BeginGroupN   AddTileGeometryObject   GetTileGroupParent   IsTileGroupContainedObject   GetTileBackgroundColor   SetTileBackgroundColor   GetTileRepetitionPoint   SetTileRepetitionPoint   GetTileOffsetPoint   SetTileOffsetPoint  



  SetTileRepetitionPoint Document Attributes 

Declaration:

PROCEDURE   SetTileRepetitionPoint
(   tileHandle :HANDLE;
    repetitionPoint :POINT
) ;

Description:

Sets the specified tile resource's repetition point.

Parameters:

tileHandle The tile resource in which to set the repetition point.
repetitionPoint The repetition point to be set.

Example:

SetTileRepetitionPoint(tileHandle, repetitionPoint);

See Also:

CreateTile   ShowEditTileDialog   ShowEditTileSettingsDialog   ShowNewTileDialog   GetTileGeometryGroup   BeginGroupN   AddTileGeometryObject   GetTileGroupParent   IsTileGroupContainedObject   GetTileBackgroundColor   SetTileBackgroundColor   GetTileRepetitionPoint   SetTileRepetitionPoint   GetTileOffsetPoint   SetTileOffsetPoint  



  SheetList Document Attributes 

Declaration:

FUNCTION   SheetList
( sheetIndex:INTEGER ) :STRING ;

Description:

Returns the name of the sheet specified by index.

Parameters:

sheetIndex Index of the sheet

Result:

Returns a string containing the name of the sheet.

See Also:

SheetNum  



  SheetNum Document Attributes 

Declaration:

FUNCTION   SheetNum
:INTEGER ;

Description:

Returns the number of sheets contained within the current document.

Result:

The number of sheets.

See Also:

SheetList  



  ShowCreateImageDialog Document Attributes 

Declaration:

FUNCTION   ShowCreateImageDialog
:HANDLE ;

Description:

Displays a dialog that allows the user to select an image file from which a new image resource is created.

Result:

Returns the handle to the newly created image resource if successful; nil otherwise.

Example:

imageHandle := ShowCreateImageDialog;



  ShowGradientEditorDialog Document Attributes 

Declaration:

PROCEDURE   ShowGradientEditorDialog
VAR gradient:HANDLE ) ;

Description:

Displays the gradient editor dialog for the specified gradient.

To create and edit a new gradient resource, pass in a handle variable initialized to nil. If successful, the handle variable will be initialized with the handle to the new gradient resource.

Parameters:

gradient The gradient resource to display in the editor dialog; nil if a new gradient is to be created.

Example:

ShowGradientEditorDialog(gradientHandle);
{ displays the specified gradient resource in the editor }

newGradientHandle := nil;
ShowGradientEditorDialog(newGradientHandle);
{ creates a new gradient resource and displays it in the editor }